home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.C.E. 2
/
ACE CD 2.iso
/
FILES
/
UTILS
/
AMOS3.DMS
/
AMOS3.adf
/
Shoot_em_up.AMOS
/
Shoot_em_up.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1978-10-10
|
5KB
|
124 lines
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'
' Blast Those Alien Scum Bags
'
' By P.J.Hickman
'
' A simple scrolly shoot-em-up with over 200 colours on screen!!!
'
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default
Screen Close 0
Close Editor
' ~~~~~ Variable definations ~~~~~
SHIP$=" Let X=150 ; Let Y=100 ; Jump Setanim ;"
SHIP$=SHIP$+" Begin: Let R0=Joy1 ; If BC(15,6,9) Jump Explode ;"
SHIP$=SHIP$+" If X<10 Jump V ;"
SHIP$=SHIP$+" If X>290 Jump Q ;"
SHIP$=SHIP$+" If Y>160 Jump N ;"
SHIP$=SHIP$+" If Y<10 Jump K ;"
SHIP$=SHIP$+" Checkfire: If R0&16 Jump Fire ;"
SHIP$=SHIP$+" Movement: If R0&1 Jump Up ;"
SHIP$=SHIP$+" If R0&2 Jump Down ;"
SHIP$=SHIP$+" If R0&4 Jump Left ;"
SHIP$=SHIP$+" If R0&8 Jump Right ;"
SHIP$=SHIP$+" Jump Begin ;"
SHIP$=SHIP$+" Up: Anim 0,(3,1) ; Move 0,-10,1 ; Jump Setanim ;"
SHIP$=SHIP$+" Down: Anim 0,(5,1) ; Move 0,10,1 ; Jump Setanim ;"
SHIP$=SHIP$+" Right: ; Move 10,0,1 ; Jump Begin ;"
SHIP$=SHIP$+" Left: ; Move -10,0,1 ; Jump Begin ;"
SHIP$=SHIP$+" Setanim: Anim 0,(1,10)(2,10) ; Jump Begin ;"
SHIP$=SHIP$+" Fire: Let RA=1 ; Jump Movement ;"
SHIP$=SHIP$+" V: Let X=10 ; Jump Checkfire ;"
SHIP$=SHIP$+" Q: Let X=290 ; Jump Checkfire ;"
SHIP$=SHIP$+" N: Let Y=160 ; Jump Checkfire ;"
SHIP$=SHIP$+" K: Let Y=10 ; Jump Checkfire ;"
SHIP$=SHIP$+"Explode: Let RZ=1 ; Anim 1,(8,1)(9,1)(10,1)(11,1)(12,1)(13,1)(14,1)(15,1)(16,1) ; P P P P P P P P P P P ; Let RX=1 ;"
'
'
Dim F1RE$(4),ALIEN$(4)
For LOP=1 To 4
ALIEN$(LOP)="Begin: Anim 0,(17,3)(18,3)(21,3)(22,3)(23,3)(24,3)(25,3)(26,3)(27,3) ; Let X=321 ;"
ALIEN$(LOP)=ALIEN$(LOP)+"For R0=1 To 36 ; Let X=X-10 ; If BC("+Str$(5+LOP)+",1,4) Jump Explode ; Next R0 ; Jump Finish ;"
ALIEN$(LOP)=ALIEN$(LOP)+"Explode: Let RZ=1 ; Anim 1,(8,1)(9,1)(10,1)(11,1)(12,1)(13,1)(14,1)(15,1)(16,1) ; P P P P P P P P P P ;"
ALIEN$(LOP)=ALIEN$(LOP)+"Finish: Let Y=-200 ; Let X=-200 ; Anim 1,(17,1) ;"
F1RE$(LOP)="Let R"+Chr$(65+LOP)+"=1 ; Let R1=320-X ; Let R2=R1/18 ; For R0=1 To R2 ; Let X=X+18 ; If BC("+Str$(LOP)+",4,14) Jump Killed ; Next R0 ;"
F1RE$(LOP)=F1RE$(LOP)+"Killed: Let R"+Chr$(65+LOP)+"=2 ;"
Next LOP
' ~~~~~ This variable controls the scroll speed, 1-16 ~~~~~
SCRSPEED=16 : LAUNCHED=1
'
' Set up screens and AMAL channels
Unpack 15 To 1
Set Rainbow 1,0,200,"","",""
For LOP=0 To 199
Rain(1,LOP)=LOP+2830
Next LOP
Rainbow 1,0,50,200
Hide On
Get Sprite Palette
Double Buffer
Autoback 0
Synchro Off : Update Off
For LOP=1 To 15
Channel LOP To Bob LOP
Next LOP
Rem ---------------------------------------------------------------------
Rem Load Landscape Picture And Bobs
Rem ---------------------------------------------------------------------
Screen Copy Logic(1),0,130,SCRSPEED,200 To Logic(1),336,130
Screen Copy Logic(1),SCRSPEED,130,336+SCRSPEED,200 To Logic(1),0,130
Screen Swap
Bob 15,0,0,1
Amal 15,SHIP$
Amal On 15
Timer=0
Make Mask
Repeat
Bob Clear
' ~~~~~ Scroll routine ~~~~~
For LOP=1 To 2
Screen Copy Logic(1),0,130,SCRSPEED,200 To Logic(1),336,130
Screen Copy Logic(1),SCRSPEED,130,336+SCRSPEED,200 To Logic(1),0,130
Next LOP
' ~~~~~~ main loop ~~~~~
' ~~~~~ Alien Control ~~~~~
For LOP=6 To 9
If Chanmv(LOP)<>-1 and Chanan(LOP)<>-1 and Timer>8
Bob LOP,321,Rnd(100)+4,17
Amal LOP,ALIEN$(LOP-5)
Amal On LOP
Timer=0
End If
Next LOP
' ~~~~~ Bang ~~~~~
If Amreg(25)=1
Sam Raw 8,Start(7),13086,4000
Amreg(25)=0
End If
' ~~~~~ Fire Power ~~~~~
If Amreg(0)=1 and Chanmv(LAUNCHED)<>-1 and Timer>4
Bob LAUNCHED,X Bob(15)+18,Y Bob(15)+6,7
Amal LAUNCHED,F1RE$(LAUNCHED)
Amal On LAUNCHED
Add LAUNCHED,1,1 To 4
Amreg(0)=0
Timer=0
If LAUNCHED<3
Sam Raw 1,Start(6),5400,10000
Else
Sam Raw 2,Start(6),5400,10000
End If
End If
For LOP=1 To 4
If Amreg(LOP)=2
Amal Off LOP
Bob Off LOP
Amreg(LOP)=0
End If
Next LOP
Synchro : Bob Draw
Screen Swap : Wait Vbl
Until Amreg(23)=1
Bob Off 15 : Update : Wait 20 : Fade 4 : Wait 55 : Screen Close 1 : Rainbow Del 1
End